#include<bits/stdc++.h>
using namespace std;
int n,a[100005],x,ans;
bool f[100005];
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin>>n;
    ans=n;
    for(int i=1;i<=n;i++){
        cin>>a[i];
    }
    sort(a+1,a+1+n);
    for(int i=1;i<=n;i++){
        if(a[i]>a[1]){
            x=i;
            break;
        }
    }
    if(x==0){
        cout<<n<<endl;
        return 0;
    }
    for(int l=1,r=x;l<=n&&r<=n;){
        if(a[r]>a[l]){
            ans--;
            r++;
            l++;
        }
        else{
            r++;
        }
    }
    cout<<ans<<endl;
    return 0;
}//5 1 2 3 1 2
